package cn.chair.entity;

import life.innovation.annotation.orm.Entity;
import life.innovation.annotation.orm.Id;
import life.innovation.model.BaseModel;

import java.util.Date;

@Entity("purchase_order")
public class Order extends BaseModel {

    public static final double MIN_FEE = 0.01;
    public static final int STATUS_CANCELLED = 0;
    public static final int STATUS_CONFIRMED = 1;
    public static final int STATUS_PENDING = 2;
    public static final int STATUS_REVERSED = 3;
    public static final int STATUS_SYNCED = 4;
    public static final int STATUS_SYNC_FAILED = 5;
    public static final int STATUS_REVERSED_SYNCED = 6;
    public static final int STATUS_REVERSED_SYNC_FAILED = 7;
    public static final int STATUS_PARTIAL_REVERSED = 8;
    public static final int STATUS_ABNORMAL = 10;
    public static final int STATUS_DELETED = 11;

    public static final int NO_PREFIX_ORDER = 1; // 订单
    public static final int NO_PREFIX_RECHARGE = 2; // 会员充值

    @Id
    private int id;
    private String merchantId;
    private String orderNo;
    private Integer refOrderId;
    private String transType;
    private double orderAmount;
    private double amount;
    private double settlementAmount;
    private double refundAmount;
    private double couponAmount;
    private int quantity;
    private Date transDate;
    private Date createdAt;
    private Date finishedAt;
    private Integer status;
    private String memo;
    private String extra;
    private int customerId;
    private int paymentId;
    private int userId;
    private int webPackageId;
    private String transNo;
    private String massageTime;
    private int chairId;
    private int runStatus;
    private int runTimeleft;
    private Date massageAt;
    private String messageAt;
    private int paySource;

    public int getPaySource() {
        return paySource;
    }

    public void setPaySource(int paySource) {
        this.paySource = paySource;
    }

    public String getMessageAt() {
        return messageAt;
    }

    public void setMessageAt(String messageAt) {
        this.messageAt = messageAt;
    }

    public Date getMassageAt() {
        return massageAt;
    }

    public void setMassageAt(Date massageAt) {
        this.massageAt = massageAt;
    }

    public int getRunStatus() {
        return runStatus;
    }

    public void setRunStatus(int runStatus) {
        this.runStatus = runStatus;
    }

    public int getRunTimeleft() {
        return runTimeleft;
    }

    public void setRunTimeleft(int runTimeleft) {
        this.runTimeleft = runTimeleft;
    }

    public Order() {
        this.status = STATUS_PENDING;
        this.createdAt = new Date();
        this.transDate = createdAt;
    }

    public int getChairId() {
        return chairId;
    }

    public void setChairId(int chairId) {
        this.chairId = chairId;
    }

    public String getMassageTime() {
        return massageTime;
    }

    public void setMassageTime(String massageTime) {
        this.massageTime = massageTime;
    }

    public String getTransNo() {
        return transNo;
    }

    public void setTransNo(String transNo) {
        this.transNo = transNo;
    }

    public int getWebPackageId() {
        return webPackageId;
    }

    public void setWebPackageId(int webPackageId) {
        this.webPackageId = webPackageId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getRefOrderId() {
        return refOrderId;
    }

    public void setRefOrderId(Integer refOrderId) {
        this.refOrderId = refOrderId;
    }

    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public double getSettlementAmount() {
        return settlementAmount;
    }

    public void setSettlementAmount(double settlementAmount) {
        this.settlementAmount = settlementAmount;
    }

    public double getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(double refundAmount) {
        this.refundAmount = refundAmount;
    }

    public double getCouponAmount() {
        return couponAmount;
    }

    public void setCouponAmount(double couponAmount) {
        this.couponAmount = couponAmount;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public Date getTransDate() {
        return transDate;
    }

    public void setTransDate(Date transDate) {
        this.transDate = transDate;
    }

    public Date getFinishedAt() {
        return finishedAt;
    }

    public void setFinishedAt(Date finishedAt) {
        this.finishedAt = finishedAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public double getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public int getCustomerId() {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }

    public int getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(int paymentId) {
        this.paymentId = paymentId;
    }
}
